﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Quanlynhasach.hethongluutru;
using Quanlynhasach.hethongxuly;
using System.Data;


namespace Quanlynhasach.hethongluutru
{
    class BaoCaoTonDAO
    {
        public static void Insert(BaoCaoTonDTO bctDTO)
        {
            string sql = "insert into BaoCaoTon(MaSach,NgayPhatSinh,TonDau,PhatSinh,TonCuoi) values(" + bctDTO.MaSach + ",'" + bctDTO.NgayPhatSinh + "'," + bctDTO.TonDau + ",'" + bctDTO.PhatSinh + "'," + bctDTO.TonCuoi + ")";
            database.ExcuNonQuery(sql);
        }
        public static DataTable BaoCaoThang(int thang)
        {
            string sql = "select * from BaoCaoTon where Month(NgayPhatSinh) like '%" + thang + "%' ";
            return database.ExcuQuery(sql);
        } 
    }
}
